package nodo;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class PilaNodoPPal {
	static BufferedReader leer = new BufferedReader (new InputStreamReader(System.in));
	static Object dato;
	static int opc=1;
	public static void main(String[] args) {
		PilaNodo clasnodo = new PilaNodo();
		while(opc!=0){
			System.out.print("\n MENU");
			System.out.print("\n 1.insertar");
			System.out.print("\n 2.quitar");
			System.out.print("\n 3.imprimir");
			System.out.print("\n 0.salir\n");
			try {
				opc=Integer.parseInt(leer.readLine());
			} catch (NumberFormatException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			switch(opc){
			case 1: 
				System.out.print("\n ingrese dato a guardar");
				try {
					dato=leer.readLine();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				clasnodo.Insertar(dato);
			break;
			case 2: clasnodo.quitar(); break;
			case 3: clasnodo.Imprimir(); break;
			case 0: System.out.print("\n adios"); break;
			default: System.out.print("\n error solo opcion entre 0 y 3"); break;
			}
			
			
		}
		


	}

}
